In a processor-based system, a cache memory is used to temporarily store information including data and instructions to enable more rapid access by processing elements of the system such as one or more processors, graphics devices and so forth. Modern processors include internal cache memories that act as depositories for frequently used and recently used information. Because this cache memory is within a processor package and typically on a single semiconductor die with one or more cores of the processor, much more rapid access is possible than from more remote locations of a memory hierarchy, which include system memory.
To enable maintaining the most relevant information within a cache, some type of replacement mechanism is used. Many systems implement a type of least recently used algorithm to maintain information. More specifically, each line of a cache is associated with metadata information relating to the relative age of the information such that when a cache line is to be replaced, an appropriate line for eviction can be determined. While such least recently used schemes work reasonably well, they are not appropriate for certain types of data. One such data type is streaming data (which is typically accessed only once) that is not typically stored in a cache memory. However there are instances where this data is accessed again, which can cause an undesirable delay to again re-access the data. Another type of data is so-called strongly resident data that is desirable to be maintained in a cache memory for longer than possible using a least recently used scheme.